import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import router from "@/routers"
import baiduMap from 'vue3-baidu-map-gl'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import {createPinia} from "pinia";
import {createPersistedState} from "pinia-persistedstate-plugin";

const app = createApp(App)
const pinia = createPinia()
const persistedState = createPersistedState()
pinia.use(persistedState)
app.use(pinia)
app.use(router)
app.use(ElementPlus)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(baiduMap,{
    ak: 'MJGEEgkMTyP96X2OuPCruuo2NG4LuHD5',
})
app.mount('#app')
